trueFalse = function (string) {
	"use strict";
	var seed = {};
	seed.id = getUniqueId();
	var sidebar = $('body').find('.side-bar .middle'),
		preview = $('body').find('.preview'),
		doc = $(document);
		
	seed.name = "";
	seed.qtext = "";
	seed.atext = false;
	seed.feedback = "";
	seed.type = "truefalse";
	
	seed.genXML = function () {
		var self = this;
		var tfstring = "";
		//write category
		//tfstring = "\t<question type=\"category\">\n\t\t<category><text>$course$/" + self.category + "</text>\n\t</category>\n</question>"
		//write question		
		tfstring += "<question type=\"truefalse\">\n\t<name>\n\t\t<text><![CDATA[<p>" + self.name + "</p>]]></text>\n\t</name>\n\t<questiontext format=\"html\">\n\t\t<text><![CDATA[<p>" + self.qtext + "</p>]]></text>\n\t</questiontext>\n\t";
		tfstring += "<answer fraction=\"";
		if(self.atext == true)
		{
			tfstring += "100\"";
		}
		else
		{
			tfstring += "0\"";
		}
		tfstring += ">\n\t\t<text>True</text>\n\t</answer>\n\t<answer fraction =\"";
		if(self.atext == true)
		{
			tfstring += "0\"";
		}
		else
		{
			tfstring += "100\"";
		}
		tfstring += ">\n\t\t<text>False</text>\n\t</answer>\n\t<generalfeedback><text><![CDATA[<p>" + self.feedback + "</p>]]></text></generalfeedback>\n</question>";
		return tfstring;
	};
	
	seed.genGift = function () {
		var self = this;
		var giftString = "";
			//write categories
			giftString = "$CATEGORY: " + self.category;
			//write question		
			giftString += "::" + self.name + "::" + self.qtext + "{" + self.atext + "#" + self.feedback +"}\n\n";
		
		return giftString;
	};
	
	seed.genQSD = function () {
		var self = this;
		var qsdString = "";
		
		qsdString += "TF:\r\n";
		qsdString += "" + self.name + "; " + self.qtext + "; ";
		qsdString += "" + self.atext + "; " + self.feedback + "\r\n\r\n";
		
		return qsdString;
	};
	
	seed.validate = function () {
		var self = this,
			error = "";
		if(self.name === "") {
			error += "Missing field(s)";
		} else if(self.qtext === "") {
			error += "Missing field(s)";
		}
		return error;
	};
	
	seed.set = function (options) {
		var self = this;
		$.each(options, function (key, value) {
			if (key === 'name') {
				self.name = value;
			} else if (key === 'qtext') {
				self.qtext = value;
			} else if (key === 'feedback') {
				self.feedback = value;
			} else if (key === 'atext') {
				self.atext = value;
			}
		});
	};
		
	if (string) {
		// spilt the string up by line
		var self = seed,
			lines = string.split("\r\n");
		
		// set up the options object
		var obj = {};
		obj.name = "";
		obj.qtext = "";
		obj.atext = "";
		obj.feedback = "";
		obj.category = "";
		
		
		// javascript does not support negative lookbehind so reverse \;
		// so negative lookahead can be used
		var line = lines[1];
		line = line.replace("\\;", ";\\");
		// split the line into its parts (name, qtext, atext, feedback)
		var data = line.split(/;(?!\\)/);
		$.each(data, function(index) {
			data[index] = data[index].replace(";\\", "\\;");
		});
		obj.name = data[0].trim();
		obj.qtext = data[1].trim();
		obj.atext = data[2].trim();
		obj.feedback = data[3].trim();

		seed.set(obj);
	
	};
	
	return seed;
};
